package com.example.homeworkmanagement.service;

import com.example.homeworkmanagement.dto.AssignmentsAndTeachersAndCoursesAndTeachersAndSubmissionsDTO;
import com.example.homeworkmanagement.dto.AssignmentsAndTeachesAndCoursesAndTeachersDTO;
import com.example.homeworkmanagement.pojo.Assignments;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.homeworkmanagement.vo.ResultVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 拒绝加班
 * @since 2025-05-25
 */
public interface AssignmentsService extends IService<Assignments> {

    // 根据作业ID删除作业
    ResultVO<Assignments> deleteAssignment(Integer assignmentId);

    // 更新作业信息
    ResultVO<Assignments> updateAssignment(Integer assignmentId, Integer teachId, String title, String content, Date startTime, Date dueTime, String state, MultipartFile file);

    // 根据作业ID查询详情
    ResultVO<Assignments> getAssignmentById(Integer assignmentId);

    // 组合查询教师发布的作业信息
    ResultVO<List<AssignmentsAndTeachesAndCoursesAndTeachersDTO>> selectAssignmentByInfos(AssignmentsAndTeachesAndCoursesAndTeachersDTO dto,int page,int size);

    // 组合查询学生作业情况
    ResultVO<List<AssignmentsAndTeachersAndCoursesAndTeachersAndSubmissionsDTO>> selectAssignmentAndSubmissionByInfos(AssignmentsAndTeachesAndCoursesAndTeachersDTO dto,String studentId,int page,int size);

    //发布作业
    ResultVO<Assignments> uploadAssignment(Integer assignmentId, Integer teachId, String title, String content, Date startTime, Date dueTime, String state, MultipartFile file);
}
